* nsterm.m (keyDown): If ns_right_alternate_modifier is Qleft, check
authorJan D. <jan.h.d@swipnet.se>
Fri, 21 Jan 2011 08:35:30 +0000 (09:35 +0100)
committerJan D. <jan.h.d@swipnet.se>
Fri, 21 Jan 2011 08:35:30 +0000 (09:35 +0100)
if ns_alternate_modifier is none.

src/ChangeLog
src/nsterm.m

index b0a905f4ab7b448cb8b62faa4b16916e5dd2a64a..aba7c8cac8ef8ce67b5e405334575d8727e64bea 100644 (file)
@@ -1,3 +1,8 @@
+2011-01-21  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * nsterm.m (keyDown): If ns_right_alternate_modifier is Qleft, check
+       if ns_alternate_modifier is none.
+
 2011-01-20  Jan Djärv  <jan.h.d@swipnet.se>
 
        * unexmacosx.c: Add comment about include order.
index 34841387d3b8b68d92f08acaf5e16b0a90880c03..0838674de2ba4292a1b33b3a537d3ab29f5f8acc 100644 (file)
@@ -4388,6 +4388,7 @@ ns_term_shutdown (int sig)
   int flags;
   static NSMutableArray *nsEvArray;
   static BOOL firstTime = YES;
+  int left_is_none;
 
   NSTRACE (keyDown);
 
@@ -4511,10 +4512,14 @@ ns_term_shutdown (int sig)
           emacs_event->modifiers |=
             parse_solitary_modifier (ns_function_modifier);
 
+      left_is_none = NILP (ns_alternate_modifier)
+        || EQ (ns_alternate_modifier, Qnone);
+
       if ((flags & NSRightAlternateKeyMask) == NSRightAlternateKeyMask)
         {
           if ((NILP (ns_right_alternate_modifier)
-               || EQ (ns_right_alternate_modifier, Qnone))
+               || EQ (ns_right_alternate_modifier, Qnone)
+               || (EQ (ns_right_alternate_modifier, Qleft) && left_is_none))
               && !fnKeysym)
             {   /* accept pre-interp alt comb */
               if ([[theEvent characters] length] > 0)
@@ -4532,9 +4537,7 @@ ns_term_shutdown (int sig)
 
       if ((flags & NSLeftAlternateKeyMask) == NSLeftAlternateKeyMask) /* default = meta */
         {
-          if ((NILP (ns_alternate_modifier)
-               || EQ (ns_alternate_modifier, Qnone))
-              && !fnKeysym)
+          if (left_is_none && !fnKeysym)
             {   /* accept pre-interp alt comb */
               if ([[theEvent characters] length] > 0)
                 code = [[theEvent characters] characterAtIndex: 0];